import CollapseTransition from 'element-ui/lib/transitions/collapse-transition'
import {
  Pagination,
  Dropdown,
  DropdownMenu,
  DropdownItem,
  Input,
  InputNumber,
  Radio,
  RadioGroup,
  RadioButton,
  Checkbox,
  CheckboxButton,
  CheckboxGroup,
  Switch,
  Select,
  Option,
  OptionGroup,
  Button,
  ButtonGroup,
  Table,
  TableColumn,
  DatePicker,
  TimeSelect,
  TimePicker,
  Popover,
  Tooltip,
  Form,
  FormItem,
  Tabs,
  TabPane,
  Tag,
  Tree,
  Slider,
  Row,
  Col,
  Upload,
  Progress,
  Badge,
  Card,
  Rate,
  Collapse,
  CollapseItem,
  Cascader,
  Timeline,
  TimelineItem,
  Link,
  CascaderPanel,
  Scrollbar,
  Popconfirm,
  Loading,
  MessageBox,
  Message,
  Notification,
  Empty,
  Descriptions,
  DescriptionsItem,
  Drawer,
  Divider,
  Container,
  Aside,
  Header,
  Main
} from 'element-ui'

export default {
  install(Vue) {
    Vue.prototype.$ELEMENT = {
      size: 'medium',
      zIndex: 3000
    }

    Vue.use(Pagination)
    Vue.use(Dropdown)
    Vue.use(DropdownMenu)
    Vue.use(DropdownItem)
    Vue.use(Input)
    Vue.use(InputNumber)
    Vue.use(Radio)
    Vue.use(RadioGroup)
    Vue.use(RadioButton)
    Vue.use(Checkbox)
    Vue.use(CheckboxButton)
    Vue.use(CheckboxGroup)
    Vue.use(Switch)
    Vue.use(Select)
    Vue.use(Option)
    Vue.use(OptionGroup)
    Vue.use(Button)
    Vue.use(ButtonGroup)
    Vue.use(Table)
    Vue.use(TableColumn)
    Vue.use(DatePicker)
    Vue.use(TimeSelect)
    Vue.use(TimePicker)
    Vue.use(Popover)
    Vue.use(Tooltip)
    Vue.use(Form)
    Vue.use(FormItem)
    Vue.use(Tabs)
    Vue.use(TabPane)
    Vue.use(Tag)
    Vue.use(Tree)
    Vue.use(Slider)
    Vue.use(Row)
    Vue.use(Col)
    Vue.use(Upload)
    Vue.use(Progress)
    Vue.use(Badge)
    Vue.use(Card)
    Vue.use(Rate)
    Vue.use(Collapse)
    Vue.use(CollapseItem)
    Vue.use(Cascader)
    Vue.use(Timeline)
    Vue.use(TimelineItem)
    Vue.use(Link)
    Vue.use(CascaderPanel)
    Vue.use(Scrollbar)
    Vue.use(Popconfirm)
    Vue.component(CollapseTransition.name, CollapseTransition)
    Vue.use(Empty)
    Vue.use(Descriptions)
    Vue.use(DescriptionsItem)
    Vue.use(Drawer)
    Vue.use(Divider)
    Vue.use(Container)
    Vue.use(Aside)
    Vue.use(Header)
    Vue.use(Main)

    Vue.use(Loading.directive)
    Vue.prototype.$loading = Loading.service
    Vue.prototype.$msgbox = MessageBox
    Vue.prototype.$alert = MessageBox.alert
    Vue.prototype.$confirm = MessageBox.confirm
    Vue.prototype.$prompt = MessageBox.prompt
    Vue.prototype.$notify = Notification
    Vue.prototype.$message = Message
  }
}
